<?php // no direct access
defined('_JEXEC') or die('Restricted access'); 
jimport('phpquery.phpquery');
phpQuery::newDocumentHTML($this->item->introtext);
$img = pq("img:first");
?>

<?php echo $this->item->event->beforeDisplayContent; ?>
<div id="mainbody">
<table cellspacing="0" cellpadding="0" class="blog">
    <tbody>
        <tr>
            <td valign="top">
                <div>
                    <table class="contentpaneopen">
                        <tbody>
                            <tr>
                                <td width="100%" class="contentheading">
                                    <a style="color:#FFFCCC;font-weight:bold" href="<?php echo $this->item->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
										<?php echo $this->escape($this->item->title); ?>
									</a>
                                </td>
                            </tr>
                            <?php if ($this->item->params->get('show_create_date')) : ?>
                            <tr valign="top">
                                <td valign="top">
                                    <table width="100%" class="artinfo_block">
                                        <tbody>
                                            <tr valign="top">
                                                <td valign="middle">
                                                    <span class="createdate"><?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?> </span>&nbsp;&nbsp;
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                            <?php endif; ?>
                        </tbody>
                    </table>
                    <table class="contentpaneopen">
                        <tbody>
                            <tr>
                                <td valign="top" colspan="2">                                
                                    <div align="justify">
										<?php if($img->size()==1):?>
											<a href="<?php echo $this->item->readmore_link; ?>">
                                            <img border="0" align="left" src="<?php echo $img->attr('src');?>"   class="caption" style="width:250px;margin-bottom:0px"/>                                            
                                            </a>
                                       
                                        <?php endif;?>
                                        <?php echo $this->escape(strip_tags($this->item->introtext)); ?>
                                     </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <table width="100%" class="read_block">
                                        <tbody>
                                            <tr>
                                                <td>
                                                    <?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
													
															<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->escape($this->item->params->get('pageclass_sfx')); ?>">
														<?php if ($this->item->readmore_register) :
															echo JText::_('Register to read more...');
														elseif ($readmore = $this->item->params->get('readmore')) :
															echo $readmore;
														else :
															echo JText::sprintf('Read more...');
																endif; ?></a>
													<?php endif; ?>
                                                </td>
                                                <td valign="middle" class="modifydate">
                                                    <?php if ( intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>
													
															<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
													
													<?php endif; ?>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <span class="article_separator">&nbsp;</span>
                </div>
            </td>
        </tr>
    </tbody>
</table>
</div>
<?php echo $this->item->event->afterDisplayContent; ?>

